package behavioral_pattern.state_pattern;

/**
 * 状态模式
 * 定义：允许一个对象在其内部状态改变时改变它的行为，对象看起来似乎修改了它的类。
 */
public class MainState {
    public static void main(String[] args) {
        Account account = new Account("BAT",0.0);
        account.deposit(10000);
        account.withDraw(20000);
        account.deposit(5000);
        account.deposit(3000);
        account.computeInterest();
    }}
